package cn.alpha.workflow.vo;

import java.io.Serializable;
import java.util.List;

public class DTResponseData implements Serializable {
	
	public DTResponseData(){}
	
	public DTResponseData(List<?> data,Long total,Integer draw){
		this.data=data;
		this.recordsTotal=total;
		this.recordsFiltered=total;
		this.draw=draw;
	}

	private static final long serialVersionUID = 1L;
	
	//必要,Datatables发送的draw是多少那么服务器就返回多少,防止跨站脚本（XSS）攻击
	protected Integer draw;
	
	//必要。即没有过滤的记录数,数据库里总共记录数
	protected Long recordsTotal;

	//必要。过滤后的记录数（如果有接收到前台的过滤条件，则返回的是过滤后的记录数）
	protected Long recordsFiltered;
	
	//必要。表中中需要显示的数据
	protected List<?> data;
	
	//可选。你可以定义一个错误来描述服务器出了问题后的友好提示
	protected String error;

	public Integer getDraw() {
		return draw;
	}

	public void setDraw(Integer draw) {
		this.draw = draw;
	}

	public Long getRecordsTotal() {
		return recordsTotal;
	}

	public void setRecordsTotal(Long recordsTotal) {
		this.recordsTotal = recordsTotal;
	}

	public Long getRecordsFiltered() {
		return recordsFiltered;
	}

	public void setRecordsFiltered(Long recordsFiltered) {
		this.recordsFiltered = recordsFiltered;
	}

	public List<?> getData() {
		return data;
	}

	public void setData(List<?> data) {
		this.data = data;
	}

	public String getError() {
		return error;
	}

	public void setError(String error) {
		this.error = error;
	}
	
	

}
